# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        
        # Changing field 'MovementOfGoods.receiptofgoods'
        db.alter_column('shop_movementofgoods', 'receiptofgoods_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shop.ReceiptOfGoods'], null=True))


    def backwards(self, orm):
        
        # User chose to not deal with backwards NULL issues for 'MovementOfGoods.receiptofgoods'
        raise RuntimeError("Cannot reverse this migration. 'MovementOfGoods.receiptofgoods' and its values cannot be restored.")


    models = {
        'shop.movementofgoods': {
            'Meta': {'object_name': 'MovementOfGoods'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'kol': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
            'product': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shop.Product']"}),
            'receiptofgoods': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shop.ReceiptOfGoods']", 'null': 'True'}),
            'sum': ('django.db.models.fields.FloatField', [], {})
        },
        'shop.product': {
            'Meta': {'object_name': 'Product'},
            'code': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
            'price': ('django.db.models.fields.FloatField', [], {}),
            'purchase_price': ('django.db.models.fields.FloatField', [], {})
        },
        'shop.receiptofgoods': {
            'Meta': {'object_name': 'ReceiptOfGoods'},
            'datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 3, 12, 14, 43, 39, 507468)'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
        }
    }

    complete_apps = ['shop']
